import os,sys 
import json 



# print(__file__)


wdir = os.path.dirname(__file__)


fns = os.listdir(wdir)
# [(k,di[k]) for k in sorted(di.keys())] 
fns = sorted(fns)
ret = '{'
fn_l = len(fns)
for i,f in  enumerate(fns):
    t = f.split('_')[:-1]
    # t = t.join('-')
    t = '-'.join(t)
    # t = t.split('-')[0]
    ret+='"'+os.path.join(wdir,f)+'":{"type":"'+t+'","status":"awaly","match":[{"carei":true,"type":"ext","key":""}]}'
    if i < fn_l-1:
        ret += ','

ret += '}'
# print(ret)
e = json.loads(ret)

c = json.dumps(e, indent=4)
print(c)


# print('}')